Component({
	data: {
		selected: null,
		color: "#7A7E83",
		selectedColor: "#000",
		list: [{
			pagePath: "/pages/index/index",
			iconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/home.23be85e.png",
			selectedIconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/home_active.81d28b7.png",
			text: "首页"
		}, {
			pagePath: "/pages/joblist/joblist",
			iconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/job.8eba739.png",
			selectedIconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/job_active.cf62a0c.png",
			text: "找工作"
		}, {}, {
			pagePath: "/pages/imlist/imlist",
			iconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/im.ba83054.png",
			selectedIconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/im_active.a0e1002.png",
			text: "消息"
		}, {
			pagePath: "/pages/personal/personal",
			iconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/user.3d6c410.png",
			selectedIconPath: "https://74cmsse.tywangcai.com/tpl/mobile/static/img/user_active.9f6d9de.png",
			text: "我的"
		}, ]
	},
	attached() {},
	methods: {
		switchTab(e) {
			const data = e.currentTarget.dataset
			const url = data.path
			if(this.data.selected === data.index){
				return false
			}
			wx.switchTab({
				url
			})
			// this.setData({
			// 	selected: data.index
			// })
		}
	}
})
